import * as path from "path";
import * as fse from "fs-extra"; 

export function generateFile(file: string, publicDir: string, data?: string) {
	const filepath = path.resolve(publicDir, file);
	fse.ensureDirSync(path.dirname(filepath));
	fse.ensureFileSync(filepath);
	if (data) {
		fse.writeFileSync(filepath, data);
	}
}
 